package com.accp.vehiclecare.biz.hzbiz;

import com.accp.vehiclecare.dao.hzdao.SupplierasMapper;
import com.accp.vehiclecare.dao.hzdao.VehiclebrandMapper;
import com.accp.vehiclecare.dao.hzdao.VehicletypeMapper;
import com.accp.vehiclecare.pojo.Enginetype;
import com.accp.vehiclecare.vo.hzvo.Vehiclebrand;
import com.accp.vehiclecare.vo.hzvo.Vehicletype;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class cxbiz {
    @Autowired(required = false)
    private VehiclebrandMapper vehiclebrandMapper;
    @Autowired(required = false)
    private VehicletypeMapper vehicletypeMapper;
    public List<Vehiclebrand> showlist(String no, String name){return vehiclebrandMapper.showlist(no, name);}
    public int addpp(Vehiclebrand vehiclebrand){return vehiclebrandMapper.addpp(vehiclebrand);}
    public Vehiclebrand selectone(Integer id){return vehiclebrandMapper.showone(id);}
    public int removepp(Integer id){return vehiclebrandMapper.removepp(id);}
    public int updatepp(Vehiclebrand vehiclebrand,Integer id){return vehiclebrandMapper.update(vehiclebrand,id);}


    public PageInfo<Vehicletype> showlist2(Integer PageNum,Integer PageSiz,String name){
        PageHelper.startPage(PageNum,PageSiz);
        return new PageInfo<Vehicletype>(vehicletypeMapper.listshow(name)) ;}

    public Vehicletype selectone2(Integer id){return vehicletypeMapper.selectone(id);}

    public int removepp2(Integer id){return vehicletypeMapper.removeVehicletype(id);}

    public int updatepp2(Vehicletype vehicletype,Integer id){return vehicletypeMapper.updateVehicletype(vehicletype,id);}

    public int addcx2(Vehicletype vehicletype){return vehicletypeMapper.addcx(vehicletype);}
}
